package com.stars.entity.job;


import javax.validation.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Table;
import io.swagger.annotations.ApiModelProperty;
import com.stars.common.base.entity.BaseAppEntity;
/**
 * @Title: 任务调度实体
 * @author dj
 * @date 2019-10-12 13:54:31
 * @version V1.0
 *
 */
@Data
@Table(name = "SYS_SCHEDULE_JOB")
@EqualsAndHashCode(callSuper = false)
public class MyScheduleJobEntity extends BaseAppEntity{

	/**任务名称*/
    @NotBlank(message="任务名称不能为空!")
    @ApiModelProperty(value = "任务名称",name ="name")
	private String name;
	/**任务分组*/
    @NotBlank(message="任务分组不能为空!")
    @ApiModelProperty(value = "任务分组",name ="group")
    @Column(name = "GROUP_JOB")
	private String groupJob;
	/**任务表达式*/
    @NotBlank(message="任务表达式不能为空!")
    @ApiModelProperty(value = "任务表达式",name ="cron")
	private String cron;
	/**执行类名*/
    @NotBlank(message="执行类名不能为空!")
    @Column(name = "CLAZZ_PATH")
    @ApiModelProperty(value = "执行类名",name ="clazzPath")
	private String clazzPath;
    @NotBlank(message="执行方法不能为空!")
    @Column(name = "JOB_METHOD")
    @ApiModelProperty(value = "执行方法",name ="jobMethod")
    private String jobMethod;
	/**job描述信息*/
    @Column(name = "JOB_DESC")
    @ApiModelProperty(value = "job描述信息",name ="jobDesc")
	private String jobDesc;
	/**job的jar路径*/
    @Column(name = "JAR_PATH")
    @ApiModelProperty(value = "job的jar路径",name ="jarPath")
	private String jarPath;
	/**任务状态， 0禁用 1启用*/
    @Column(name = "STATUS_JOB")
    @ApiModelProperty(value = "任务状态， 0禁用 1启用",name ="statusJob")
	private String statusJob;
	/**任务调度类型，0：接口，1：存储过程*/
    @Column(name = "JOB_TASK_TYPE")
    @ApiModelProperty(value = "任务调度类型，0：接口，1：存储过程",name ="jobTaskType")
	private String jobTaskType;
	/**接口地址*/
    @Column(name = "API_URL")
    @ApiModelProperty(value = "接口地址",name ="apiUrl")
	private String apiUrl;
	/**参数*/
    @ApiModelProperty(value = "参数",name ="params")
	private String params;
	/**任务类型，0：周期性，1：一次性*/
    @Column(name = "JOB_TYPE")
    @ApiModelProperty(value = "任务类型，0：周期性，1：一次性",name ="jobType")
	private String jobType;
	/**触发器名字*/
    @Column(name = "TRIGGER_NAME")
    @ApiModelProperty(value = "触发器名字",name ="triggerName")
	private String triggerName;
	/**触发器分组*/
    @Column(name = "TRIGGER_GROUP")
    @ApiModelProperty(value = "触发器分组",name ="triggerGroup")
	private String triggerGroup;
	/**是否立即运行，0：否，1：是*/
    @Column(name = "IS_NOW_RUN")
    @ApiModelProperty(value = "是否立即运行，0：否，1：是",name ="isNowRun")
	private String isNowRun;
	/**生效日期*/
    @Column(name = "STATUS_DATE")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "生效日期",name ="statusDate")
	private Date statusDate;
	/**失效日期*/
    @Column(name = "END_DATE")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "失效日期",name ="endDate")
	private Date endDate;


}